package com.smartrobot.smartrobot.Config;

import android.content.Context;

import java.util.Properties;

/**
 * Created by Administrator on 2014/12/22.
 */
public class Config {

   private  static  Properties prop;

   public Config(Context context){

       SetConfig(context);
   }

    //设置配置文件
    public static Properties GetConfig(){
        return prop;
    }

    public static void  config_init(Context context){
        SetConfig(context);
    }

    //设置配置文件
    public static  void SetConfig(Context context){
        try{
            prop = new Properties();
            int id = context.getResources().getIdentifier("config", "raw",context.getPackageName());
            prop.load(context.getResources().openRawResource(id));
        }catch (Exception e) {
            e.printStackTrace();
        }

    }


}
